package com.rgs.platform.controller;

import com.rgs.base.core.model.WebApiReturnResultModel;
import com.rgs.platform.entity.BillInfoDO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ren Gaoshuai
 * @ClassName TestController
 * @date 2022-08-08 13:32
 **/
@RestController
@RequestMapping("/rgs")
public class TestController {


    @GetMapping("/test/{ids}")
    public WebApiReturnResultModel find(@PathVariable String[] ids) throws ClassNotFoundException {
        System.out.println(ids.length);
        for (String id : ids) {
            System.out.println("id="+id);
        }
        //反射-包名
        Class<?> billInfoDOByPackage = Class.forName("com.rgs.platform.entity.BillInfoDO");
        //反射-类名
        Class<BillInfoDO> billInfoDOByClass = BillInfoDO.class;
        //反射-对象名
        BillInfoDO billInfoDO = new BillInfoDO();
        Class<? extends BillInfoDO> billInfoDOByObj = billInfoDO.getClass();
        return WebApiReturnResultModel.ofSuccess();
    }

    @GetMapping("/test2")
    public WebApiReturnResultModel find2(@PathVariable String[] ids){
        return WebApiReturnResultModel.ofSuccess();
    }
}
